const { Sequelize } = require("sequelize");
const config = require("../../config");

const sequelize = new Sequelize(
    config.database.db,
    config.database.user,
    config.database.password,
    {
        host: config.database.host,
        port: config.database.port,
        dialect: "mysql",
        timezone: "+08:00",
        logging: false,
        pool: {
            max: 5,
            min: 0,
            acquire: 30000,
            idle: 10000
        }
    }
);

module.exports = sequelize;